<template>
	<view class="establish">
		<view class="typeList" @tap="setPayPassword">
			<view class="info">
				<u-field v-model.trim="changePay" type="text" :disabled="true" label-width="200" :password-icon="true" input-align="right"
				 right-icon="arrow-right" label="修改支付密码" placeholder=" " placeholder-style="font-size:30rpx;color:#BFBFBF;"></u-field>
			</view>
		</view>
		<view class="typeList" @tap="resetPayPassword">
			<view class="info">
				<u-field v-model.trim="zeroPay" type="text" :disabled="true" label-width="200" :password-icon="true" input-align="right"
				 right-icon="arrow-right" label="重置支付密码" placeholder=" " placeholder-style="font-size:30rpx;color:#BFBFBF;"></u-field>
			</view>
		</view>

	</view>
</template>

<script>

	import {
		validate
	} from '@/common/api/index'

	export default {
		data() {
			return {
				changePay: '',
				zeroPay: '',
				is_payPaw: ''
			}
		},
		components: {

		},
		onLoad() {
		
		},
		onShow() {
			// this.payPassword()
		},
		onUnload() {

		},
		onBackPress(e) {
		},
		methods: {
			// 判断是否设置支付密码
			payPassword() {
				this.$api.post(global.apiUrls.postUserCheck_pay_password, {
					
				}).then(res => {
					uni.hideLoading()
					if(res.data.code == 1) {
						this.is_payPaw = res.data.data.withdraw_paw
					} else {
						this.$message.info(res.data.msg)
					}
				})
			},
			// 修改支付密码
			setPayPassword() {
				uni.navigateTo({
					url: '/pages/index/setting/setPayPassword?type=' + 2
				})
				
			},
			// 重置支付密码
			resetPayPassword() {
				uni.navigateTo({
					url: '/pages/index/setting/verify-oldphone?type=' + 3
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	page {
		background: #FFFFFF;
		height: 100%;
	}

	.establish {
		// padding: 0 32upx;
		min-height: 100vh;
		background: #FFFFFF;

		.typeList {
			padding: 0 32rpx;
			background: #FFFFFF;
		}

		.info {
			padding: 32rpx 0;
			border-bottom: 1px solid #f2f2f1;
			position: relative;
			font-size: 32rpx;

			.code {
				position: absolute;
				top: 36upx;
				left: 188upx;
				color: #3993E1;
				font-size: 28upx;
			}

			.codeTime {
				position: absolute;
				top: 36upx;
				left: 188upx;
				font-size: 28upx;
			}
		}

		.one {
			// padding: 16upx 0;
			// display: flex;
			height: 351rpx;
			background: #f2f2f1;
			padding: 65rpx 0 0 !important;
			text-align: center;


			.touxiang {
				margin-bottom: 24rpx;
			}

			.usering {
				text-align: center;
				margin: 0 auto;
				width: 180upx;
				height: 180upx;
				border-radius: 8rpx;
				position: relative;

				image {
					width: 180upx;
					height: 180upx;
					border-radius: 8rpx;
				}

				.camera {
					position: absolute;
					right: 0;
					bottom: 0;
					width: 56rpx;
					height: 56rpx;
				}
			}
		}

		.tow {
			display: flex;

			.sex {
				flex: 5;
			}

			.radio {
				flex: 5;
				text-align: right;
			}
		}

		.three {
			display: flex;

			.post {
				flex: 2;
			}

			.post_type {
				flex: 8;
				text-align: right;

				span {
					padding: 12upx 40upx;
					border: 1px solid #999999;
					font-size: 28upx;
					margin-left: 16upx;
					border-radius: 8upx;
				}
			}
		}

		.four {
			display: flex;

			.four_1 {
				flex: 3;
			}

			.four_2 {
				flex: 7;
				text-align: right;
				color: #bfbfbf;

				.icon_x {
					margin-left: 18upx;
					margin-top: -4upx;
					color: #999999;
				}

				.queryaddress {
					text-align: left;
					display: inline-block;
					color: #333333;
				}
			}
		}

		.submit {
			position: fixed;
			left: 32upx;
			bottom: 40upx;
			width: 686upx;
			height: 88upx;
			background: #006747;
			opacity: 1;
			border-radius: 8upx;
			font-size: 32upx;
			color: #FFFFFF;
			text-align: center;
			line-height: 88upx;
			// margin: 40upx 0;
		}
	}

	/deep/.u-field {
		padding: 0 !important;
		font-size: 32upx !important;
		color: rgba(51, 51, 51, 1);
	}

	/deep/.u-flex {
		width: 100%;
		margin: 0;
		font-size: 32rpx;
	}

	/deep/.fild-body {
		font-size: 32rpx !important;
	}

	/deep/.u-field__input-wrap {
		// height: 128upx;
		// line-height: 128upx;
		font-size: 32upx;
		color: rgba(51, 51, 51, 1);
	}

	/deep/.u-field-inner {
		// width: 100% ;
	}

	.active {
		border: 1px solid #3993E1 !important;
		color: #3993E1;
	}

	.line {
		height: 20rpx;
		width: 100%;
		background: #f2f2f1;
	}
</style>
